package spaska.data;

import spaska.data.Attribute.ValueType;

public abstract class Value implements Cloneable, Comparable<Value> {

	public abstract Object getValue();

	public abstract ValueType getType();

	public abstract Object clone();

	public abstract int compareTo(Value v);

	@Override
	public String toString() {
		return getValue() + "";
	}

	@Override
	public boolean equals(Object o) {
		if (o instanceof Value) {
			Value other = (Value) o;
			return getType().equals(other.getType()) && getValue().equals(other.getValue());
		}
		return false;
	}

	@Override
	public int hashCode() {
		return getValue().hashCode();
	}

}
